var stepId = $CertusJsonAjax.getStepInstanceId();
var processId = $CertusJsonAjax.getProInstanceId();
$CertusFormAjax.ajax("findLcDemanList",{"processId":processId},function(response){
    var data = response.data;
    $$scope.dmNo = data.dm_no;
    $$scope.dmState = data.dm_state;
    $$scope.pdLine = data.pd_line;
    $$scope.proType = data.pro_type;
    $$scope.proName = data.pro_name;
    $$scope.version = data.version;
    $$scope.proStage = data.pro_stage;
    if (data.pro_lv=="3"){
        $$scope.proLv = "高";
    }else if (data.pro_lv=="2"){
        $$scope.proLv = "中";
    }else{
        $$scope.proLv = "低";
    }

    if (data.dm_level=="3"){
        $$scope.dmLv = "高";
    }else if (data.dm_level=="2"){
        $$scope.dmLv = "中";
    }else{
        $$scope.dmLv = "低";
    }
    $$scope.deliverDate = data.deliver_date;
    $$scope.createUser = data.createUser;
    $$scope.createTime = data.createTime;
    $$scope.dmDesc = data.dm_desc;
    $$scope.riskRating = data.risk_rating;
    $$scope.id = data.id;

    $$scope.planPayDate = data.plan_pay_date;
    $$scope.deliverVersion = data.deliver_version;
    $$scope.mgRiskRating = data.mg_risk_rating;
    $$scope.reasonAnalyse = data.reason_analyse;
    $$scope.workRating = data.work_rating;
    $$scope.mgOpinionMsg = data.mg_opinion_msg;

    $$scope.payDate = data.pay_date;
    $$scope.payVersion = data.pay_version;
    $$scope.xqWorkRating = data.xq_work_rating;
    $$scope.meetingContent = data.meeting_content;
    $$scope.demanOption = data.deman_option;
    $$scope.pduMgOption = data.pdu_mg_option;

    $$scope.devMgOption = data.dev_mg_option;
    $$scope.payMgOption = data.pay_mg_option;
    $$scope.validResult = data.valid_result;

});
$(".agree").on('click',function () {
    var spoption = $("#vaildOption").val();
    var id = $("#dmLcId").val();
    $CertusFormAjax.ajax("toAgree",{"stepId":stepId,"spoption":spoption,"id":id},function(response){
        layer.msg("提交成功");
        window.history.back();
    });
});
$(".unagree").on('click',function () {
    var spoption = $("#vaildOption").val();
    var id = $("#dmLcId").val();
    $CertusFormAjax.ajax("toUnAgree",{"spoption":spoption,"id":id},function(response){
        layer.msg("提交成功");
        window.history.back();
    });
});